import time

t = time.time()
print(t)

time.sleep(0.5)
t1 = time.time()
print(t1)

s = time.ctime(t)
print(s)

# 将时间戳转为元组
l = time.localtime(t)
print(l)
print(l.tm_year, l.tm_mon)

# 将元组转成时间戳
mk = time.mktime(l)
print(mk)

# 将字符串转成元组
p = time.strptime('2019/09/09', '%Y/%m/%d')
print(p)

# 将元组转成字符串
res = time.strftime('%Y-%m-%d %H:%M:%S')
print(res)


'''
    time模块
    重点：
        time()
        sleep()
        strftime()
        strptime()
    了解
        元组
            
        
        
'''